Skip to content

feat(record-page): a related tab's menu moves and hides it, and 「更多」 restores the default order - #35818

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-35783-related-tab-arrangement
Nov 20, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-35783-related-tab-arrangement

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread
Fixes #35783

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户看到的变化:记录页上打开某个子表页签,再点一次它就弹出「左移」「右移」「隐藏」;隐藏的子表收进「更多」,只要顺序或隐藏不是默认的,「更多」里就有「恢复默认顺序」,一点就恢复顺序并重新显示全部子表,抽屉里也一样能用。概览、附件、审批、动态这四个页签不能移动或隐藏。
  • 为什么:上一次记录页改版去掉了右栏的子表卡片,读者调整子表顺序、隐藏子表的入口也随之没了;您定的是「先合并,另开卡恢复」,这次把这些操作放回到页签上。
  • 如果判断错:只影响每位读者自己的页签排列,不动数据和应用配置;以前保存的顺序和隐藏照常生效,撤回这一次合并即可恢复原样。
  • 需要您做的:无。

What changes

A reader arranges the record page's related lists from their tabs again. The related cards that carried the ⠿ handle, ⌥↑ / ⌥↓ and 「隐藏」 left the page with #35763; the maintainer's decision on that removal was 「先合并,另开卡恢复」.

  • A related list's tab is its menu. The open related tab draws a ▾ and is its own menu's trigger: click it again, or press Enter, Space or ↓ on it. The menu holds 「左移」, 「右移」 and 「隐藏」. A related tab that is not open opens on its first click or Enter, as before.
    • 「左移」 / 「右移」 move the list one place among the related lists. At either end the way out is disabled.
    • 「隐藏」 takes the list off the row into 「更多」's hidden lists and returns the page to 概览, so the face of a hidden list is not left open.
  • 「更多」 restores the default. While the order or the hidden set is not the default, 「更多」 ends with 「恢复默认顺序」 (the default order, every list shown). When nothing overflows and nothing is hidden but the order was moved, the trigger is drawn as a bare 「更多」 with that one entry. This is the reset for a drawer and an embedded pane, which have no rail.
  • Fixed tabs. 概览, 附件, 审批 and 动态 (and an open body table) carry no menu and never move.
  • One stored arrangement. Every edit goes through editRelatedArrangement in synth/relatedArrangement.ts (move = its move-up / move-down, hide = hide, reset = restore-default-arrangement), into the same per-reader, per-object workspace preference the cards wrote. A stored order and stored hides keep working, and the rail's 「已隐藏 N · 显示」 / 「恢复默认顺序」 foot still undoes them on a full page.
  • i18n. Hide reuses detail.relatedCardHide, the reset reuses detail.relatedRestoreDefaultOrder, the bare trigger reuses common.more. No key fitted 「左移」 / 「右移」, so detail.recordTabMoveBefore / detail.recordTabMoveAfter are added in all eleven packs. They are named by position in the row, not by side: in Arabic, where the row runs right to left, "before" reads as "move right".
  • Removed. RelatedCardStack.tsx and useRelatedArrangement.ts. Nothing else imported them once their two foot-line helpers (RelatedDefaultChangedHint, RelatedFootLine) moved into RecordPageColumns.tsx as module-local components, and neither is exported from the package.
  • Kept, deliberately. RelatedCardMenu.tsx is not deleted: RelatedList.tsx still imports it (outside this card's fence). The reducer's tests (synth/__tests__/relatedArrangement-27055.test.ts) are untouched.
  • RecordDetailView.tsx is not touched. The drawer goes through the same RecordPageColumns path with rail={false}, and the host already passes the stored arrangement and its setter.

Size: 21 files, +535 / −461 (996 changed lines; 435 of the deletions are the two removed files).

Tests

New pins (plugin-detail, in the shared harness file RecordPageColumns.readerArrangement-35595.test.tsx, as a new top-level describe)
  • 「左移」 and 「右移」 move the open list one place and write the stored order; on the last list 「右移」 is aria-disabled (CONTROL: 「左移」 is not).
  • 「隐藏」 takes the open list into 「更多」's hidden lists, writes the hidden set and returns to 概览.
  • 「更多」's 「恢复默认顺序」 restores the default order and shows every list, in a drawer (rail={false}, no foot line); CONTROL: in the default arrangement there is no 「更多」 at all.
  • A row moved but with nothing hidden still offers the reset, under a bare 「更多」.
  • 概览, 附件, 审批 and 动态 open no menu and carry no aria-haspopup; CONTROL: an open list's tab carries aria-haspopup="menu" and opens its menu.
  • A list's tab that is not open opens on its first click and on Enter, with no menu.
Playwright (ui/e2e/record-tabs-rail-35595.spec.ts, new top-level describe, Chromium, zh-CN)
  • 右移 then 左移 on 联系人; CONTROL, 概览 opens no menu; 右移 on 报价单, 隐藏 on 商机 (the page returns to 概览, 商机 sits under 「更多」's hidden lists); 恢复默认顺序 brings back the default order; CONTROL, no 「更多」 afterwards.
  • It asserts only orders and presence: no width, no text width and no fixed-window fold, so it does not depend on CJK fonts.
Migrated and retired tests
  • Retired: none.
  • Edited: RecordPageColumns.readerArrangement-35595.test.tsx (header now says the move and hide came back on the tabs; its nine existing cases are unchanged), ui/e2e/record-tabs-rail-35595.spec.ts (header bullet and the new describe; its five cases are unchanged).
  • Removed with their modules: none. RelatedCardStack-27055.test.tsx was already retired by feat(record-page): one tab per related list, and an Overview rail that sums up the other tabs #35763, and useRelatedArrangement had no test of its own.
Platform checklist
  • Added records-forms.related-tab-arrangement (revision 1) in docs/qa/platform-checklist/areas/records-forms.json: move, hide, reload persistence, the reset in 「更多」, the fixed tabs, the drawer, and the pins. It was read from source on this branch; no live run was made.
Runs (all heavy runs through scripts/pm/os-verify-lock.sh)
  • pnpm exec vitest run packages/plugin-detail/ packages/i18n/ packages/app-shell/src/__tests__/defaults-maps-mirror-en-pack.test.tsx (from ui/): Test Files 498 passed / 1 skipped, Tests 5549 passed / 31 skipped, VERDICT command-exit 0. This ran at 819ea87; the only later commit, 17dd9e4, touches .changeset/ alone.
  • RecordPageColumns.readerArrangement-35595.test.tsx: 15 passed (9 existing + 6 new).
  • Playwright record-tabs-rail-35595.spec.ts, Chromium: 6 passed (5 existing + 1 new).
  • type-check @object-ui/plugin-detail and @object-ui/i18n (tsc --noEmit && tsc -p tsconfig.test.json): both Done, VERDICT command-exit 0. type-check:e2e (ui root): VERDICT command-exit 0.
  • pnpm --dir ui exec vitest run scripts/: 171 files passed / 2 skipped, 5092 tests passed, VERDICT command-exit 0.
  • Before that, the dependency closure was built: pnpm turbo run build --filter='@object-ui/plugin-detail^...' --concurrency=2, 52/52 tasks, VERDICT command-exit 0.
Ablations (each through scripts/ablation-replace.mjs: the anchor hit once, the blob changed, the file was restored with blob == HEAD and an empty git diff HEAD)

The subject is imported from src/ by relative path, so no build sits between the edit and the test.

  • move (the move-up / move-down edit replaced by a no-op): the 左移/右移 pin went red, 1 failed / 14 passed.
  • hide (the hide edit replaced by a no-op): the 隐藏 pin went red, 1 failed / 14 passed.
  • reset (onResetArrangement replaced by void 0): both reset pins went red, 2 failed / 13 passed. The first attempt used the replacement undefined, which the tool refused because the text already occurs in the file. It ran nothing and restored, and was redone with void 0.
  • fixed (Attachments given arrange): the fixed-tabs pin went red, 1 failed / 14 passed.

Acceptance notes

  • Release note. feat(record-page): one tab per related list, and an Overview rail that sums up the other tabs #35763's pending changeset is left exactly as it is on main. Its bullet "Reader arrangement leaves with the cards" says a reader can no longer reorder or hide a related list. This PR's own changeset says plainly that reader arrangement is back and that it supersedes that bullet: 左移 / 右移 / 隐藏 are on each related tab's menu, 「恢复默认顺序」 is in 「更多」 (in the drawer and embedded pane too), and stored arrangements keep applying. The release notes read the two changesets together.
  • Design choice: the open tab is the menu trigger. I chose this over a separate ▾ button so that the tablist holds only tabs (aria-haspopup="menu" on a tab is allowed) and the row's width measuring stays the same. The ▾ is measured only on the open tab, so inactive tabs keep their width and the fold is unchanged. To move a list that is not open, the reader opens it first.
  • RelatedCardMenu.tsx stays because RelatedList.tsx imports it. With RelatedCardStack gone, nothing in production provides RelatedCardChromeContext, so RelatedList's cardChrome branch (the ⠿ handle and the ⋯ 隐藏 menu) can no longer draw on a page. Only its tests provide the context. That is dead code outside this fence; not filed.
  • Stale comments name RelatedCardStack in RecordDetailView.tsx (around lines 1277 and 4327), RelatedList.tsx (around line 1370) and ui/packages/plugin-detail/README.md (line 849). All are outside the fence and were not touched.
  • The 48 h 「新」 badge and the mark-seen stamp were the cards' (useRelatedArrangement). They do not come back on the tabs, and a relationship new since the reader's last move is still placed by the reducer's rule 3.
  • The rail's foot line (「已隐藏 N · 显示」, 「恢复默认顺序」, the changed-default hint) is kept on a full page. On a full page the reset is therefore offered twice, in the rail's foot and in 「更多」.

Verification

Two-minute check: open a record with three or more related lists at 1280 × 800. Open the second list's tab and click it again; expect 左移 / 右移 / 隐藏. Choose 左移, and the tab moves one place left. Choose 隐藏 on another list: the page returns to 概览, and 「更多」 lists it under 已隐藏 with 恢复默认顺序 at the end. Choose 恢复默认顺序: the default order comes back with every list. Do the same in the record drawer.

Read first:

  1. ui/packages/plugin-detail/src/RecordTabRow.tsx: the related tab wrapped as a controlled DropdownMenu trigger, and its onOpenChange / onKeyDown. A tab that is not open must select, not open a menu.
  2. ui/packages/plugin-detail/src/RecordPageColumns.tsx: arrangeTab (hiding the open tab closes its face) and onResetArrangement (offered only while resolved.rearranged).
  3. ui/packages/plugin-detail/src/synth/recordTabRow.ts: alwaysInDropdown now counts the reset entry, which makes the dropdown exist.

Gates: on head 17dd9e4, dispatch-gates.mjs --commands derived 48 families and all 48 ran locally (--ran: 48 derived, 48 run, 0 NOT-MEASURED). On head 95aefa1, which only restores #35763's changeset and rewrites this PR's own, the changeset families were run again and every one exited 0: check-empty-changeset --base origin/main and its --self-test, check-changeset-no-major, check-adr-0087-registration and its --self-test, check:changeset-gate-self-tests, check-closing-keyword-parity and its --self-test, check:nul-bytes. check-platform-checklist --changed-from origin/main: OK, 2 anchors judged, 0 lost. overlap-check before each push exited 0 (it shares the locale files with #35747, which merges cleanly). The wide run belongs to CI.


Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY

…e fixed tabs; add the checklist item

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
…here moving and hiding went

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 20, 2026
… reader arrangement is back

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CbSphdunq2aJq7ktuY
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Final head for L1: 95aefa18c378e827626bd554f81e4044dcdc858a · 2026-11-20T10:09Z

Readings

  • CI on this head: 52 success, 13 skipped, 0 failed.
  • check-governed-merges --pr 35818: not governed, 994 lines (+534 / −460), 20 files.
  • K: 8.
  • Declared lines: Clause-②: no · Metadata-protocol: none · Fixes #35783.
  • Claim: 7034746613.

What it changes

  • Tab menu. Each related-list tab regains reader arrangement on its own menu: 左移, 右移 and 隐藏. A second click on the open tab opens the menu, and so do Enter, Space and ArrowDown.
    • All three write through editRelatedArrangement into the same stored per-reader arrangement, so stored orders and hides keep applying.
    • Hiding the open tab returns the page to 概览.
  • Reset in 「更多」. 「更多」 ends with 「恢复默认顺序」 whenever the arrangement isn't the default. When nothing else is folded, 「更多」 shows bare, so the drawer and the embedded pane can reset too.
  • Fixed tabs. 概览, 附件, 审批 and 动态 have no menu.
  • Removals.
    • RelatedCardStack.tsx and useRelatedArrangement.ts are deleted. Their two foot-line helpers moved into RecordPageColumns.tsx.
    • RelatedCardMenu.tsx is kept, because RelatedList.tsx, outside the fence, still imports it.
  • i18n. Two keys are added in all 11 packs: detail.recordTabMoveBefore / detail.recordTabMoveAfter. Hide and reset reuse existing keys.
  • Changeset. This PR's changeset says reader arrangement is back and supersedes feat(record-page): one tab per related list, and an Overview rail that sums up the other tabs #35763's "leaves with the cards" bullet. feat(record-page): one tab per related list, and an Overview rail that sums up the other tabs #35763's changeset is untouched.

Tests

  • RecordPageColumns.readerArrangement-35595.test.tsx: 15 tests (6 new: move, hide, reset in a drawer, reset under a bare 「更多」, fixed tabs, and an unopened tab selecting on click or Enter).
  • Playwright record-tabs-rail-35595.spec.ts: 6/6. The new move/hide/reset case checks order only, with no width.
  • plugin-detail + i18n vitest: 498 files, 5,549 tests.
  • Ablations each went red and were restored with blob == HEAD: a no-op move, a no-op hide, a no-op reset, and an arrange menu on Attachments.
  • dispatch-gates --commands: 48 run. The changeset families exit 0 on this head.

Not filed (noted)

  • RelatedList.tsx's cardChrome branch is now dead in production.
  • Stale RelatedCardStack comments remain in RecordDetailView.tsx, RelatedList.tsx and the README.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 按您「先合并,另开卡恢复」的决定,读者重新可以调整记录页的子表页签:打开某个子表页签后再点它,菜单里有左移、右移、隐藏。
  • 「更多」里新增「恢复默认顺序」,一键回到默认顺序并显示全部隐藏的子表;抽屉和嵌入面板里也能用。
  • 概览、附件、审批、动态这几个固定页签不能移动或隐藏;读者以前保存的顺序和隐藏照样生效。
  • 已不再使用的旧卡片组件一并删除。
  • 席位意见:通过,无需再改,分区可以合并。

席位核对

ACCEPT · head 95aefa18c3 · Fixes #35783 (p1; maintainer 「先合并,另开卡恢复」 on the seat's #35763 card) · K=8 · merge-tree vs origin/main clean (#35763 is on main as b0c624af8c) · governed: no · +534/−460, 20 files · CI 52 success, 13 skipped, 0 pending · 2026-11-20T10:10Z

Routing: no packages/spec face, Clause-②: no, not governed, under 3000 lines → the area lands it.

Checked:

  • Writes: the tab menu and the 「更多」 reset both go through editRelatedArrangement (synth/relatedArrangement.ts), the reducer the cards used (move-up / move-down / hide / restore-default-arrangement), so stored orders and hides keep applying and the rail's foot line still undoes them. editArrangement moved above the row; no second writer.
  • Which tabs: arrange is set only on resolved.order tabs (shown related lists), with before / after disabled at the ends; 概览, 附件, 审批, 动态 and an open body table carry none. Only the ACTIVE related tab opens its menu (onOpenChange(open && active)); on an inactive one Enter / Space select it instead. Hiding the open list closes it back to 概览 and moves focus to the first tab.
  • 「更多」: exists whenever the reset is offered, even with nothing folded (alwaysInDropdown counts the reset; label falls back to common.more, and the aria-label with a count is only set when there is one). It renders in the row, so it works in a drawer and an embedded pane.
  • Deletions: RelatedCardStack.tsx and useRelatedArrangement.ts have no importer left; the two foot-line helpers they exported moved into RecordPageColumns.tsx unchanged. RelatedCardMenu.tsx stays because RelatedList.tsx imports it (claim: "if nothing else imports them").
  • i18n: two keys (recordTabMoveBefore / After) where no existing key fits (the card keys say up / down); ar swaps the words for the RTL row. Everything else reuses existing keys.
  • Surface: all 20 files inside claim 7034746613; ⛔ RecordDetailView.tsx untouched.
  • Changeset: supersedes feat(record-page): one tab per related list, and an Overview rail that sums up the other tabs #35763's "leaves with the cards" bullet in its own text, which is how a released note is corrected.

No required item.

Nit (no action required):

  • In an RTL locale the menu's ← / → icons stay physical while the words are mirrored; flip the icons with rtl: in a later touch.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CbSphdunq2aJq7ktuY

Landing · area ux-1 · 2026-11-20T10:11Z

Reading Value
check-governed-merges --pr 35818 not governed, 994 lines → ordinary queue landing
K (merge base..origin/main, first-parent) 8 (< 15)
CI on head 95aefa18c3 52 success, 13 skipped, 0 failed or pending

Head 95aefa18c378e827626bd554f81e4044dcdc858a: L1-a ACCEPT 7036869352, no required items. Ready + auto-merge now. Fixes #35783.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 20, 2026 10:11
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 1d7015a Nov 20, 2026
66 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-35783-related-tab-arrangement branch November 20, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

记录页子表页签恢复读者调整:每个子表页签的菜单可左移、右移、隐藏,「更多」里可恢复默认(承 #35595)

2 participants